There is a conventional technique including estimating a distance from an object based on a plurality of images that can be obtained by photographing the same object from a plurality of viewpoints that are mutually different and using the estimated distance information in image processing. It is conventionally known to use a disparity between images as a method for estimating distance information based on a plurality of images corresponding to different viewpoints. The disparity is a value representing a deviation of the position of an image region corresponding to the same object region between images corresponding to respective viewpoints. The magnitude of a disparity is dependent on the distance from an object. Therefore, it is feasible to estimate the distance from the object based on the magnitude of the disparity having occurred between respective images and the distance between respective viewpoints. The disparity is obtained by detecting image regions corresponding to the same object region between images captured at respective viewpoints, for example, by using an appropriate method (e.g., block matching method).
As discussed in Japanese Patent No. 4517449, there is a conventionally known technique capable of reducing the processing load in block matching by using a plurality of images generated by applying a filter to a disparity estimation target image and are mutually different in resolution. According to the technique discussed in Japanese Patent No. 4517449, speedily obtaining high-resolution disparity information is feasible by performing block matching in a limited search range block of an image having a higher resolution based on a result of the block matching applied to a low-resolution image. Further, as discussed in Japanese Patent No. 5323222, it is a conventionally known technique for inserting a provisional disparity value or using a value interpolated by a peripheral disparity value as a disparity value of a texture-less region, i.e., a region in which the matching accuracy tends to deteriorate in the block matching and the variation of pixel value in the block is small.
According to the technique discussed in Japanese Patent No. 4517449, if the block matching performed on a low-resolution image, there will be a higher possibility that a plurality of objects mutually differentiated in distance is included in one block, compared to a case where an image having a higher resolution is used. When a far and near adjacent region (i.e., a region including a plurality of objects mutually differentiated in distance) is included in one block, the disparity is not constant in the block. Therefore, the accuracy of the block matching will deteriorate. Accordingly, even in the block matching performed on an image having a higher resolution based on a result of the block matching performed on a low-resolution image, there is a problem that the accuracy of the block matching deteriorates in the far and near adjacent region. Further, according to a technique discussed in Japanese Patent No. 5323222, there is a problem that a disparity value inserted or interpolated in the texture-less region may not reflect an actual disparity value.